<template>
    <a-card id="file-reader-test" hoverable>
        <a-row class="info-line">
            <a-col>
                <a-button size="small" @click="selectFile">选择文件</a-button>&nbsp;
                <span>{{ file_fullname }}</span>
            </a-col>
        </a-row>

        <a-row class="info-line">
            <a-col>
                <a-button size="small" @click="openFile">打开文件</a-button>&nbsp;
                <span>{{ file_handle }}</span>
            </a-col>
        </a-row>

        <a-row class="info-line">
            <a-col>
                <a-button size="small" @click="closeFile">关闭文件</a-button>&nbsp;
                <!-- <span>{{ file_handle }}</span> -->
            </a-col>
        </a-row>

        <a-row class="info-line">
            <a-col>
                <a-button size="small" @click="readFile">读取文件</a-button>&nbsp;
                <!-- <span>{{ file_handle }}</span> -->
            </a-col>
        </a-row>
    </a-card>
</template>

<style lang="less">
#file-reader-test {
    height: 100%;
    overflow: auto;

    .info-line{
        margin-bottom: 8px;
    }
}
</style>

<script lang="ts" src="./FileReader.vue.ts" />